<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_investigation_file`.
 */
class m171030_073312_create_project_investigation_file_table extends Migration
{
    /**
     * @inheritdoc
     * 项目附件（尽调9+1附件）
     */
    public function up()
    {
        $this->createTable('project_investigation_file', [
            'id' => $this->bigPrimaryKey(),
            'project_id' => $this->bigInteger()->notNull(),
            'title' => $this->string()->comment('文件名'),
            'category' => $this->string()->comment('类别'),
            'size' => $this->string()->comment('大小'),
            'uploaded_by' => $this->integer()->comment('上传人'),
            'download_count' => $this->string()->comment('下载次数'),
            'created_at' => $this->timestamp(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_investigation_file');
    }
}
